package com.oocl.euc.core.maintenance.service;

import com.oocl.euc.core.maintenance.model.Status;
import com.oocl.euc.core.maintenance.repository.StatusRepository;
import com.oocl.euc.framework.base.persistence.IBaseRepository;
import com.oocl.euc.framework.base.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StatusService extends BaseService<Status, Long> {

    @Autowired
    private StatusRepository statusRepository;


    @Override
    protected IBaseRepository<Status, Long> getRepository() {
        return statusRepository;
    }

    public List<Status> getStatusByType(String statusType) {
        return statusRepository.getStatusByType(statusType);
    }

    public Status findByStatusName(String statusName) {
        return statusRepository.findStatusByName(statusName);
    }
}
